cmake_minimum_required(VERSION 3.15)

file(GLOB_RECURSE HEADERS_FILES ${CMAKE_CURRENT_LIST_DIR}/include/*.h)
file(GLOB_RECURSE SOURCES_FILES ${CMAKE_CURRENT_LIST_DIR}/src/*.cpp)
file(GLOB_RECURSE RESOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/res/*.*)

add_compile_definitions(RESOURCE_DIRECTORY="${CMAKE_CURRENT_LIST_DIR}/res")
add_executable(HelloOpenGL)

target_sources(
    HelloOpenGL
    PRIVATE
        ${SOURCES_FILES}
    PUBLIC
        ${HEADERS_FILES}
        ${RESOURCE_FILES}
)

include_directories (
    ${CMAKE_CURRENT_LIST_DIR}/../glew-2.1.0/include
    ${CMAKE_CURRENT_LIST_DIR}/include
)

target_link_libraries(HelloOpenGL 
    PUBLIC
        glfw
        glew_s
)